class Solution {
public:
    void moveZeroes(vector<int>& nums) {
        int n = nums.size();
        int quick_index=0,slow_index = 0;
        while(quick_index<n){
            if(nums[quick_index]!=0){
                swap(nums[quick_index],nums[slow_index]);
                slow_index++;
            }
            quick_index++;
        }
    }
};